#include "Light.h"
#include "Scene.h"

//ConcreteElementLoader<Light> *Light::loader = new ConcreteElementLoader<Light>();

Light::Light(TiXmlElement *elem) {

}

bool Light::handleProperties(TiXmlElement *element, int &enabled) {
	
	if (element->QueryIntAttribute("enabled", &enabled) == TIXML_SUCCESS) {
			return NO_ERROR;
	}
	
	return ERROR;
}

void Light::printComponents(LightComponents lights) {

	cout << "ambient: "; printRGBA(lights.ambient);
	cout << "diffuse: "; printRGBA(lights.diffuse);
	cout << "specular: "; printRGBA(lights.specular);
}

void Light::printRGBA(sRgba rgba) {
	cout << "r: " << rgba.r << " g: " << rgba.g <<
		" b: " << rgba.b << " a: " << rgba.a << endl;
}

//void Light::initElement() {}
//void Light::displayElement() {}